@if ($paginator->hasPages())
    <div class="row" style="margin-bottom: 10px;">
        <div class="col-sm-12 col-md-5">
            <div class="dataTables_info" id="add-row_info" role="status"
                 aria-live="polite">共有数据: {{ $paginator->total() }} 条
            </div>
        </div>

        <div class="col-sm-12 col-md-7">
            <div class="dataTables_paginate paging_simple_numbers" id="add-row_paginate">
                <ul class="pagination">
                    {{-- Previous Page Link --}}
                    @if ($paginator->onFirstPage())
                        <li class="paginate_button page-item previous disabled" id="add-row_previous">
                            <a href="#" aria-controls="add-row" data-dt-idx="0" tabindex="0" class="page-link">前一页</a>
                        </li>
                    @else
                        <li class="paginate_button page-item previous" id="add-row_previous">
                            <a href="{{ $paginator->previousPageUrl() }}&{{$keywords}}" aria-controls="add-row"
                               data-dt-idx="0" tabindex="0" class="page-link">前一页</a>
                        </li>
                    @endif

                    {{-- Pagination Elements --}}
                    @foreach ($elements as $element)
                        {{-- "Three Dots" Separator --}}
                        @if (is_string($element))
                            <li class="paginate_button page-item ">
                                {{ $element }}
                            </li>
                        @endif
                        {{-- Array Of Links --}}
                        @if (is_array($element))
                            @foreach ($element as $page => $url)
                                @if ($page == $paginator->currentPage())
                                    <li class="paginate_button page-item active ">
                                        <a href="#" aria-controls="add-row" data-dt-idx="1" tabindex="0"
                                           class="page-link">{{ $page }}</a>
                                    </li>
                                @else
                                    <li class="paginate_button page-item">
                                        <a href="{{ $url }}&{{$keywords}}" aria-controls="add-row" data-dt-idx="1"
                                           tabindex="0" class="page-link">{{ $page }}</a>
                                    </li>
                                @endif
                            @endforeach
                        @endif
                    @endforeach

                    {{-- Next Page Link --}}
                    @if ($paginator->hasMorePages())
                        <li class="paginate_button page-item next" id="add-row_next">
                            <a href="{{ $paginator->nextPageUrl() }}&{{$keywords}}" aria-controls="add-row" data-dt-idx="3"
                               tabindex="0"
                               class="page-link">下一页</a>
                        </li>
                    @else
                        <li class="paginate_button page-item next disabled" id="add-row_next">
                            <a href="#" aria-controls="add-row" data-dt-idx="3" tabindex="0"
                               class="page-link">下一页</a>
                        </li>
                    @endif
                </ul>
            </div>
        </div>
    </div>
@endif